-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support nested memoize (2nd) #5
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 046f24f:
|
https://codesandbox.io/s/vanilla-typescript-forked-d83b8?file=/src/index.ts @theKashey This is what I wanted and looks ok. // will look again
console.log(
getItemA({ state: prevState, id: 3 }) === getItemA({ state, id: 3 })
); |
👍 , this was a little issue for During This touched moment is a missing piece. Thank's @dai-shi, I'll make my stuff a little bit touched as well. |
I was just about to create a redux example, and found unexpected behavior. Maybe a bug... 🤔 |
https://codesandbox.io/s/proxy-memoize-demo-forked-fi5ni?file=/src/App.tsx |
#4 was suboptimal and didn't work for the case I wanted to make work.
Instead of
trackMemo
, this propagatesaffected
to parent memoize functions even if it's returning a cached value.